<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelectedIndexChangingPage.aspx.cs" Inherits="SelectedIndexChangingPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" BackColor="White"
            BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" CaptionAlign="Right"
            CellPadding="4" GridLines="Horizontal" OnPageIndexChanging="GridView1_PageIndexChanging"
            PageSize="5" OnSelectedIndexChanging="GridView1_SelectedIndexChanging">
            <PagerSettings FirstPageText="FirstPage" LastPageText="LastPage" NextPageText="Next"
                PageButtonCount="5" Position="TopAndBottom" PreviousPageText="Previous" />
            <FooterStyle BackColor="White" ForeColor="#333333" />
            <RowStyle BackColor="White" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" Wrap="False" />
            <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="#">
                    <ItemTemplate>
                        <asp:Button ID="Button1" runat="server" CommandName="Select" Text="Select" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    
    </div>
    </form>
</body>
</html>
